<%@page contentType="text/html;charset=UTF-8"%>
<%@ page import="whf.framework.web.Constants"%>
<%@ page import="whf.framework.util.ParamUtils" %>

<%@taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/tlds/framework.tld" prefix="framework"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><framework:attr source="STRUTS-META" attr="name" /></title>
<jsp:include page="/common/inc/select.jsp" />
</head>
<%
long deptid = ParamUtils.getLongParameter(request, "deptId", 0);
String queryString = "";
if(deptid > 0){
	queryString = "t.dept.id="+deptid;
}
%>
<body>
<framework:msg />
<html:form action='<%=  (String)request.getAttribute(Constants.STRUTS_PATH) %>' method="post">
<html:hidden property="webMethod" value="list" />
<framework:ext />
<framework:query  view="FMK-USER-LIST" displayColumnCount="2" />
<framework:table pkStyle="checkbox_counter" navPosition="both" queryString="<%= queryString %>" view="FMK-USER-LIST">
<framework:caption><span class="whf_object_title"><framework:attr source="STRUTS-META" attr="name" /></span></framework:caption>
</framework:table>
<framework:funcbtn operation="prepareCreate" validationFunction="" valueKey="form.create" />
<framework:funcbtn operation="activate" validationFunction="selectionMoreThanOne" valueKey="auth.user.activate" />
<framework:funcbtn operation="deactivate" validationFunction="selectionMoreThanOne" valueKey="auth.user.deactivate" />
<framework:funcbtn operation="prepareUpdate" validationFunction="selectionMoreThanOne" valueKey="form.update" />
<framework:funcbtn operation="duplicate" 	validationFunction="selectionMoreThanOne" valueKey="form.duplicate" />
<framework:funcbtn operation="delete" 		validationFunction="selectionMoreThanOne" valueKey="form.delete" />

<framework:funcbtn operation="prepareAddToRole" submitFunction="addToRole" 	validationFunction="selectionMoreThanOne" valueKey="auth.user.add_to_role" />
<html:reset><bean:message key="form.reset" /></html:reset>
</html:form>

</body>
<script>
function addToGroup(operation){
	openWindow("framework/security/User.do?webMethod="+operation+"&id="+getSelectedIds(),"left=200, top=200, width=450,height=360");
}
function addToRole(operation){
	openWindow("framework/security/User.do?webMethod="+operation+"&id="+getSelectedIds(),"left=200, top=200, width=450,height=360");
}
</script>
</html> 